The present invention relates to a communication control method and apparatus for connecting apparatuses such as a host computer and printer.
In recent years, an IEEE1394 interface is used for connecting a computer and peripheral apparatus, or connecting peripheral apparatuses. The IEEE1394 interface allows higher-speed, two-way communications as compared to a hand-shake scheme such as a Centronics interface. Also, the IEEE1394 interface is a memory bus model interface, and equipments connected via the IEEE1394 interface can read data from the designated address of a connected equipment and can write data at the designated address.
IEEE1394 defines the protocol of the physical and link layers utilized in many applications, but does not define detailed protocols in units of equipments. For this reason, the protocol of the transport layer such as SBP (Serial Bus Protocol)-2 that uses IEEE1394 as the physical and link layers has been proposed. The transport layer provides a data transfer function to an application, and applications which use this layer can exchange data with each other.
The protocol SBP-2 utilizes the features of the memory bus model of IEEE1394, and with this protocol, the data receiving side can receive data as its resources become available.
In SBP-2, when data is to be transferred, the transmitting side performs operation called a login to establish a channel with a communication partner. In this case, the logged-in side is called an initiator, and the partner is called a target. Data transfer is done in such a manner that the target reads/write data from/to the initiator in accordance with an instruction from the initiator. In this scheme, the initiator generates an ORB (Operation Request Block) that contains the storage address, size, and the like of data to be transmitted after the login, and informs the target of the address of that ORB. The target reads out data from the initiator on the basis of the address and size written in the ORB and processes the readout data, or writes data as its resources become available. After such processing, the target generates a status block to inform the initiator of the processing state.
When a communication is made using SBP-2 built based on IEEE1394, especially when SBP-2 is applied to data transfer from a data source such as a host computer or the like, which serves as an initiator, to a peripheral apparatus such as a printer apparatus, which serves as a target, the following two problems are posed.
(1) The procedure is complex due to full-duplex communications.
In SBP-2, data transfer is basically managed by the initiator, and the target cannot asynchronously transfer data to the initiator. In SBP-2, when the target wants to transfer data to the initiator, it sends a data read request using unsolicited status to the initiator. The initiator generates an ORB in response to the request, and adds the generated ORB to the end of a list of pending ORBs (including a data transfer request from the initiator to the target, and the like). These ORBs are processed in turn from the oldest one. For this reason, only when the ORB processing of the initiator side has progressed, and the initiator processes the ORB generated in response to the data read request from the target, the target can transfer data to the initiator. That is, the data transfer timing from the target to the initiator is not the issuance timing of the read request from the target to the initiator but is delayed from that timing by the time required for processing the pending ORBs. As a result, two-way, asynchronous data transfer cannot be done. When data to be transferred from the target to the initiator is generated asynchronously, for example, when the target is a printer and an error occurs in that printer, the data to be immediately transmitted to the initiator cannot be transferred in real time.
For this reason, in order to transfer data asynchronously generated by a printer to a host in real time, the printer must undertake a login procedure as an initiator, and must perform data transfer to the host computer as a target.
In this way, when the host computer and printer log in each other, and they both serve as an initiator and target, they must both own processes as an initiator and target. The printer must also perform a login.
A peripheral apparatus such as a printer which processes an image consumes large volumes of memory and processor resources for image processing. For this reason, in order to reduce the cost by simplifying the apparatus arrangement and to attain quick processing, resources used for purposes other than image processing must be reduced as much as possible. However, when the printer must run many processes, as described above, many resources are consumed accordingly, thus disturbing a cost reduction and efficient processing.
On the other hand, data that flow between the host computer and printer are related to each other like print data and its processing status. If channels are set in two ways by independent login processes, their data and responses must be related to each other, and a new processing protocol therefor must be added.
In this way, it is inappropriate to directly apply IEEE1394 and SBP-2 to communications between the host computer and printer, and it is hard to reduce required resources in the respective apparatuses and to improve efficiency.
(2) Multi-channels cannot be realized.
Recently, a multi-functional machine that combines various functions is popularly used as a peripheral apparatus. For example, a digital multi-functional machine which allows a host computer to use it as a scanner, printer, and facsimile is known. When such apparatus is used, a plurality of functions can be simultaneously used if communications are made via a plurality of independent channels in units of functions.
However, since SBP-2 cannot provide multi-channels, it is difficult to use such unit functions simultaneously.
Some protocols other than SBP-2 can transfer asynchronously generated data and can realize multi-channels. However, such protocols cannot utilize the features of IEEE1394 as the memory bus model. That is, when such protocols are applied to communications between the host and printer, the printer cannot perform data transfer at its convenience, and the host must perform data transfer while monitoring the printer state.